
set scheme lean1
use "bcms_byprov_allph", clear
	keep if inarmm==1
	
	destring provid, replace
	label define province 7 "Basilan" 36 "Lanao del Sur" 38 "Maguindanao" 66 "Sulu" 70 "Tawi-Tawi" 98 "Cotabato City" ///
		47 "North Cotabato" 63 "South Cotabato" 35 "Lanao del Norte" 97 "City of Isabela"
		
	label values provid "province" 
	g _yearmonth=string(year)+"m"+string(month)
	g yearmonth=monthly(_yearmonth,"YM",2099)
	
	format yearmonth %tm
	
	keep if yearmonth<=monthly("2013m10","YM",2099)
	
	preserve
		collapse (sum) *_prov, by(yearmonth)
		g provid=0
		
		tempfile temp
		save `temp'
		
	restore
	append using `temp'
			
	local start=monthly("2013m8","YM",2099)	
	local end=monthly("2013m10","YM",2099)
	graph twoway (line eventviolent_prov yearmonth if provid==7, lwidth(.3))  ///
		(line eventviolent_prov yearmonth if provid==36, lwidth(.3)) /// 
		(line eventviolent_prov yearmonth if provid==38, lwidth(.3)) ///
		(line eventviolent_prov yearmonth if provid==66, lwidth(.3)) ///
		(line eventviolent_prov yearmonth if provid==70, lwidth(.3)) ///
		(line eventviolent_prov yearmonth if provid==97, lwidth(.3)) ///
		(line eventviolent_prov yearmonth if provid==98, lwidth(.3)), ///
		legend(label(1 "Basilan") label(2 "Lanao del Sur") label(3 "Maguindanao") ///
		label(4 "Sulu") label(5 "Tawi-Tawi") label(6 "City of Isabela") label(7 "Cotabato City") position(6) rows(2)) ///
		xline(`start', lcolor(black)) xline(`end', lcolor(black)) ytitle("Number of Violent Events") xtitle("Year-Month")
	graph export "eventviolent_byprov.png", as(png) width(3000) replace
		
